//
//  MKTChatItemUnknowTVCell.m
//  MKUITestApp
//
//  Created by 苏尚进 on 2021/7/9.
//  Copyright © 2021 moon. All rights reserved.
//

#import "MKTChatItemUnknowTVCell.h"

@implementation MKTChatItemUnknowTVCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.tipLabel = [[MKTLabel alloc] init];
        self.tipLabel.textAlignment = NSTextAlignmentCenter;
        self.tipLabel.text = @"该版本不支持该类型消息";
        self.tipLabel.font = [UIFont systemFontOfSize:13];
        self.tipLabel.textColor = [UIColor whiteColor];
        self.tipLabel.backgroundColor = [UIColor grayColor];
        self.tipLabel.contentInsets = UIEdgeInsetsMake(5, 5, 5, 5);
        self.tipLabel.clipsToBounds = YES;
        self.tipLabel.layer.cornerRadius = 3;
        [self.contentView addSubview:self.tipLabel];
        self.flowlayout = [[MKUIFlowLayoutConstraint alloc] initWithItems:@[self.tipLabel] constraintParam:(MKUIFlowLayoutConstraintParam_H_C_C) contentInsets:UIEdgeInsetsMake(5, 5, 5, 5) interitemSpacing:5];
    }
    return self;
}
- (void)customLayoutSubviews{
    [super customLayoutSubviews];
    CGRect bounds = self.contentView.bounds;
    self.flowlayout.bounds = bounds;
    [self.flowlayout layoutItemsWithResizeItems:YES];
}
- (void)customReloadCellModel{
    [super customReloadCellModel];
}
- (CGSize)customSizeThatFits:(CGSize)size{
    return CGSizeMake(size.width, 44);
}
@end
